/**
 * 
 */
package com.yuedao.sender.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Transient;

import cn.ydx.protobuf.OTIpcDef;

/**
 * @author Jason Biao
 *
 *         网约车驾驶员基本信息接口
 */
@Entity
public class BaseInfoDriver extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5112602418044045610L;
	
	private int address;

	private String driverPhone;
	
	private String driverName; 

	private String driverGender;

	private int driverBirthday;
	
	private String driverNationLity;

	private String driverNation;
	
	private String driverMaritalStatus;
	
	private String driverLanguageLevel;
	
	private String driverEducation;
	
	private String driverCensus;
	
	private String driverAddress;
	
	private String driverContactAddress;
	
	private String photoId;

	private String licenseId;
	
	private String licensePhotoId;
	
	private String driverType;

	private int getDriverLicenseDate;

	private int driverLicenseOn;

	private int driverLicenseOff;

	private int taxiDriver;

	private String certificateNo;

	private String networkCarIssueOrganization;

	private int networkCarIssueDate;

	private int getNetworkCarProofDate;

	private int networkCarProofOn;

	private int networkCarProofOff;

	private int registerDate;
	
	private int fullTimeDriver;
	
	private int inDriverBlackList;

	private int commercialType;

	private String contractCompany;

	private int contractOn;

	private int contractOff;
	
	private String emergencyContact;
	
	private String emergencyContactPhone;
	
	private String emergencyContaceAddress; 

	private int state;

	 //身份证正面，反面照片
    @Transient
    private String identityPhotoPositive;
    @Transient
    private String identityPhotoNegative;
    //驾驶证正面，反面，及副本正面照片
    @Transient
    private String driverLicensePositive;
    @Transient
    private String driverLicenseNegative;
    @Transient
    private String driverCopyPositive;
    
  //出租汽车营运证
    @Transient
    private String taxiOperationCertificate;
    //从业资格证正面
    @Transient
    private String qualificationCertificatePositive;
    //从业资格证反面
    @Transient
    private String qualificationCertificateNegative;
	
	
	public String getDriverName() {
		return driverName;
	}

	public void setDriverName(String driverName) {
		this.driverName = driverName;
	}

	public String getDriverNationLity() {
		return driverNationLity;
	}

	public void setDriverNationLity(String driverNationLity) {
		this.driverNationLity = driverNationLity;
	}

	public String getDriverMaritalStatus() {
		return driverMaritalStatus;
	}

	public void setDriverMaritalStatus(String driverMaritalStatus) {
		this.driverMaritalStatus = driverMaritalStatus;
	}

	public String getDriverLanguageLevel() {
		return driverLanguageLevel;
	}

	public void setDriverLanguageLevel(String driverLanguageLevel) {
		this.driverLanguageLevel = driverLanguageLevel;
	}

	public String getDriverEducation() {
		return driverEducation;
	}

	public void setDriverEducation(String driverEducation) {
		this.driverEducation = driverEducation;
	}

	public String getDriverCensus() {
		return driverCensus;
	}

	public void setDriverCensus(String driverCensus) {
		this.driverCensus = driverCensus;
	}

	public String getDriverAddress() {
		return driverAddress;
	}

	public void setDriverAddress(String driverAddress) {
		this.driverAddress = driverAddress;
	}

	public String getPhotoId() {
		return photoId;
	}

	public void setPhotoId(String photoId) {
		this.photoId = photoId;
	}

	public String getLicensePhotoId() {
		return licensePhotoId;
	}

	public void setLicensePhotoId(String licensePhotoId) {
		this.licensePhotoId = licensePhotoId;
	}

	public String getDriverType() {
		return driverType;
	}

	public void setDriverType(String driverType) {
		this.driverType = driverType;
	}

	public int getFullTimeDriver() {
		return fullTimeDriver;
	}

	public void setFullTimeDriver(int fullTimeDriver) {
		this.fullTimeDriver = fullTimeDriver;
	}

	public int getInDriverBlackList() {
		return inDriverBlackList;
	}

	public void setInDriverBlackList(int inDriverBlackList) {
		this.inDriverBlackList = inDriverBlackList;
	}

	public String getEmergencyContact() {
		return emergencyContact;
	}

	public void setEmergencyContact(String emergencyContact) {
		this.emergencyContact = emergencyContact;
	}

	public String getEmergencyContactPhone() {
		return emergencyContactPhone;
	}

	public void setEmergencyContactPhone(String emergencyContactPhone) {
		this.emergencyContactPhone = emergencyContactPhone;
	}

	public String getEmergencyContaceAddress() {
		return emergencyContaceAddress;
	}

	public void setEmergencyContaceAddress(String emergencyContaceAddress) {
		this.emergencyContaceAddress = emergencyContaceAddress;
	}

	public int getAddress() {
		return address;
	}

	public void setAddress(int address) {
		this.address = address;
	}

	public String getDriverPhone() {
		return driverPhone;
	}

	public void setDriverPhone(String driverPhone) {
		this.driverPhone = driverPhone;
	}

	public String getDriverGender() {
		return driverGender;
	}

	public void setDriverGender(String driverGender) {
		this.driverGender = driverGender;
	}

	public int getDriverBirthday() {
		return driverBirthday;
	}

	public void setDriverBirthday(int driverBirthday) {
		this.driverBirthday = driverBirthday;
	}

	public String getDriverNation() {
		return driverNation;
	}

	public void setDriverNation(String driverNation) {
		this.driverNation = driverNation;
	}

	public String getDriverContactAddress() {
		return driverContactAddress;
	}

	public void setDriverContactAddress(String driverContactAddress) {
		this.driverContactAddress = driverContactAddress;
	}
	@Column
	public String getLicenseId() {
		return licenseId;
	}

	public void setLicenseId(String licenseId) {
		this.licenseId = licenseId;
	}

	public int getGetDriverLicenseDate() {
		return getDriverLicenseDate;
	}

	public void setGetDriverLicenseDate(int getDriverLicenseDate) {
		this.getDriverLicenseDate = getDriverLicenseDate;
	}

	public int getDriverLicenseOn() {
		return driverLicenseOn;
	}

	public void setDriverLicenseOn(int driverLicenseOn) {
		this.driverLicenseOn = driverLicenseOn;
	}

	public int getDriverLicenseOff() {
		return driverLicenseOff;
	}

	public void setDriverLicenseOff(int driverLicenseOff) {
		this.driverLicenseOff = driverLicenseOff;
	}

	public int getTaxiDriver() {
		return taxiDriver;
	}

	public void setTaxiDriver(int taxiDriver) {
		this.taxiDriver = taxiDriver;
	}

	public String getCertificateNo() {
		return certificateNo;
	}

	public void setCertificateNo(String certificateNo) {
		this.certificateNo = certificateNo;
	}

	public String getNetworkCarIssueOrganization() {
		return networkCarIssueOrganization;
	}

	public void setNetworkCarIssueOrganization(String networkCarIssueOrganization) {
		this.networkCarIssueOrganization = networkCarIssueOrganization;
	}

	public int getNetworkCarIssueDate() {
		return networkCarIssueDate;
	}

	public void setNetworkCarIssueDate(int networkCarIssueDate) {
		this.networkCarIssueDate = networkCarIssueDate;
	}

	public int getGetNetworkCarProofDate() {
		return getNetworkCarProofDate;
	}

	public void setGetNetworkCarProofDate(int getNetworkCarProofDate) {
		this.getNetworkCarProofDate = getNetworkCarProofDate;
	}

	public int getNetworkCarProofOn() {
		return networkCarProofOn;
	}

	public void setNetworkCarProofOn(int networkCarProofOn) {
		this.networkCarProofOn = networkCarProofOn;
	}

	public int getNetworkCarProofOff() {
		return networkCarProofOff;
	}

	public void setNetworkCarProofOff(int networkCarProofOff) {
		this.networkCarProofOff = networkCarProofOff;
	}

	public int getRegisterDate() {
		return registerDate;
	}

	public void setRegisterDate(int registerDate) {
		this.registerDate = registerDate;
	}

	public int getCommercialType() {
		return commercialType;
	}

	public void setCommercialType(int commercialType) {
		this.commercialType = commercialType;
	}

	public String getContractCompany() {
		return contractCompany;
	}

	public void setContractCompany(String contractCompany) {
		this.contractCompany = contractCompany;
	}

	public int getContractOn() {
		return contractOn;
	}

	public void setContractOn(int contractOn) {
		this.contractOn = contractOn;
	}

	public int getContractOff() {
		return contractOff;
	}

	public void setContractOff(int contractOff) {
		this.contractOff = contractOff;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	 public static OTIpcDef.BaseInfoDriver convert(BaseInfoDriver data){
	        OTIpcDef.BaseInfoDriver item = OTIpcDef.BaseInfoDriver.newBuilder()
	                .setCompanyId(data.getCompanyId())
	                .setAddress(data.getAddress())
	                .setDriverPhone(data.getDriverPhone())
	                .setDriverGender(data.getDriverGender())
	                .setDriverBirthday(Long.valueOf(data.getDriverBirthday()))
	                .setDriverNation(data.getDriverNation())
	                .setDriverContactAddress(data.getDriverContactAddress())
	                .setLicenseId(data.getLicenseId())
	                .setGetDriverLicenseDate(Long.valueOf(data.getGetDriverLicenseDate()))
	                .setDriverLicenseOn(Long.valueOf(data.getDriverLicenseOn()))
	                .setDriverLicenseOff(Long.valueOf(data.getDriverLicenseOff()))
	                .setTaxiDriver(data.getTaxiDriver())
	                .setCertificateNo(data.getCertificateNo()== null ? "":data.getCertificateNo())
	                .setNetworkCarIssueOrganization(data.getNetworkCarIssueOrganization())
	                .setNetworkCarIssueDate(Long.valueOf(data.getNetworkCarIssueDate()))
	                .setGetNetworkCarProofDate(Long.valueOf(data.getGetNetworkCarProofDate()))
	                .setNetworkCarProofOn(Long.valueOf(data.getNetworkCarProofOn()))
	                .setNetworkCarProofOff(Long.valueOf(data.getNetworkCarProofOff()))
	                .setRegisterDate(Long.valueOf(data.getRegisterDate()))
	                .setCommercialType(data.getCommercialType())
	                .setContractCompany(data.getContractCompany())
	                .setContractOn(Long.valueOf(data.getContractOn()))
	                .setContractOff(Long.valueOf(data.getContractOff()))
	                .setState(data.getState())
	                .setFlag(data.getFlag())
	                .setUpdateTime(Long.valueOf(data.getUpdateTime()))
	                .setDriverName(data.getDriverName())
	                .setDriverNationality(data.getDriverNationLity())
	                .setDriverMaritalStatus(data.getDriverMaritalStatus()== null ? "": data.getDriverMaritalStatus())
	                .setDriverLanguageLevel(data.getDriverLanguageLevel()== null ? "":data.getDriverLanguageLevel())
	                .setDriverEducation(data.getDriverEducation()== null ? "" : data.getDriverEducation())
	                .setDriverCensus(data.getDriverCensus()== null? "" : data.getDriverCensus() )
	                .setDriverAddress(data.getDriverAddress())
	                .setPhotoId(data.getPhotoId()== null ? "" : data.getPhotoId())
	                .setLicensePhotoId(data.getLicensePhotoId()== null ? "" : data.getLicensePhotoId())
	                .setDriverType(data.getDriverType())
	                .setFullTimeDriver(data.getFullTimeDriver())
	                .setInDriverBlacklist(data.getInDriverBlackList())
	                .setEmergencyContact(data.getEmergencyContact()== null ? "" :data.getEmergencyContact())
	                .setEmergencyContactPhone(data.getEmergencyContactPhone()== null ? "" :data.getEmergencyContactPhone())
	                .setEmergencyContactAddress(data.getEmergencyContaceAddress()== null ? "":data.getEmergencyContaceAddress())
	                
	                .build();

	        return item;
	    }

	@Override
	public String toString() {
		return "BaseInfoDriver [address=" + address + ", driverPhone="
				+ driverPhone + ", driverName=" + driverName
				+ ", driverGender=" + driverGender + ", driverBirthday="
				+ driverBirthday + ", driverNationLity=" + driverNationLity
				+ ", driverNation=" + driverNation + ", driverMaritalStatus="
				+ driverMaritalStatus + ", driverLanguageLevel="
				+ driverLanguageLevel + ", driverEducation=" + driverEducation
				+ ", driverCensus=" + driverCensus + ", driverAddress="
				+ driverAddress + ", driverContactAddress="
				+ driverContactAddress + ", photoId=" + photoId
				+ ", licenseId=" + licenseId + ", licensePhotoId="
				+ licensePhotoId + ", driverType=" + driverType
				+ ", getDriverLicenseDate=" + getDriverLicenseDate
				+ ", driverLicenseOn=" + driverLicenseOn
				+ ", driverLicenseOff=" + driverLicenseOff + ", taxiDriver="
				+ taxiDriver + ", certificateNo=" + certificateNo
				+ ", networkCarIssueOrganization="
				+ networkCarIssueOrganization + ", networkCarIssueDate="
				+ networkCarIssueDate + ", getNetworkCarProofDate="
				+ getNetworkCarProofDate + ", networkCarProofOn="
				+ networkCarProofOn + ", networkCarProofOff="
				+ networkCarProofOff + ", registerDate=" + registerDate
				+ ", fullTimeDriver=" + fullTimeDriver + ", inDriverBlackList="
				+ inDriverBlackList + ", commercialType=" + commercialType
				+ ", contractCompany=" + contractCompany + ", contractOn="
				+ contractOn + ", contractOff=" + contractOff
				+ ", emergencyContact=" + emergencyContact
				+ ", emergencyContactPhone=" + emergencyContactPhone
				+ ", emergencyContaceAddress=" + emergencyContaceAddress
				+ ", state=" + state + ", identityPhotoPositive="
				+ identityPhotoPositive + ", identityPhotoNegative="
				+ identityPhotoNegative + ", driverLicensePositive="
				+ driverLicensePositive + ", driverLicenseNegative="
				+ driverLicenseNegative + ", driverCopyPositive="
				+ driverCopyPositive + ", taxiOperationCertificate="
				+ taxiOperationCertificate
				+ ", qualificationCertificatePositive="
				+ qualificationCertificatePositive
				+ ", qualificationCertificateNegative="
				+ qualificationCertificateNegative + "]";
	}

	public String getIdentityPhotoPositive() {
		return identityPhotoPositive;
	}

	public void setIdentityPhotoPositive(String identityPhotoPositive) {
		this.identityPhotoPositive = identityPhotoPositive;
	}

	public String getIdentityPhotoNegative() {
		return identityPhotoNegative;
	}

	public void setIdentityPhotoNegative(String identityPhotoNegative) {
		this.identityPhotoNegative = identityPhotoNegative;
	}

	public String getDriverLicensePositive() {
		return driverLicensePositive;
	}

	public void setDriverLicensePositive(String driverLicensePositive) {
		this.driverLicensePositive = driverLicensePositive;
	}

	public String getDriverLicenseNegative() {
		return driverLicenseNegative;
	}

	public void setDriverLicenseNegative(String driverLicenseNegative) {
		this.driverLicenseNegative = driverLicenseNegative;
	}

	public String getDriverCopyPositive() {
		return driverCopyPositive;
	}

	public void setDriverCopyPositive(String driverCopyPositive) {
		this.driverCopyPositive = driverCopyPositive;
	}

	public String getTaxiOperationCertificate() {
		return taxiOperationCertificate;
	}

	public void setTaxiOperationCertificate(String taxiOperationCertificate) {
		this.taxiOperationCertificate = taxiOperationCertificate;
	}

	public String getQualificationCertificatePositive() {
		return qualificationCertificatePositive;
	}

	public void setQualificationCertificatePositive(
			String qualificationCertificatePositive) {
		this.qualificationCertificatePositive = qualificationCertificatePositive;
	}

	public String getQualificationCertificateNegative() {
		return qualificationCertificateNegative;
	}

	public void setQualificationCertificateNegative(
			String qualificationCertificateNegative) {
		this.qualificationCertificateNegative = qualificationCertificateNegative;
	}

	 
}
